package pratima.innerClass;

public class LocalInnerClass {

	private String nameOut = "Name from Outer Class";
	public void sayHello() {
		System.out.println("This is from Local InnerClass.sayHelo");
	
	//This class is defined in sayHello method
	class LocalClass {
		
		public String nameIn = "Name from Inner class";
		public void sayHelloFromInner() {
			System.out.println("This is from Local class.sayHelloInner");
			System.out.println("Name Out" +nameOut);
		}
	}
	LocalClass local = new LocalClass();
	local.sayHelloFromInner();
	System.out.println("Name from in "+local.nameIn);
	}
	
	public void sayHi() {
		//Here we cannot access localClass as it is local to the
		//method sayHello. They are very much local to the place where 
		//they are defined
	}
}

